+ echo 'Removing NML shared memory segments'
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1001
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1002
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1003
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1004
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1005
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ '[' -f /tmp/emc.lock ']'
+ rm /tmp/emc.lock
+ echo 'Cleanup done'
Cleanup done
+ exit -1
+ ErrorCheck
+ result=255
+ '[' '!' -z :0.0 ']'
+ /usr/bin/wish8.5
+ echo 'catch {send -async popimage destroy .}; destroy .'
+ '[' 255 -ne 0 ']'
+ tty -s
+ '[' -f /dev/fd/2 ']'
+ echo '(debug information was sent to stderr)'
+ '[' -f /tmp/emc.print.WUZjj9 ']'
+ cp /tmp/emc.print.WUZjj9 /home/stonok2/emc_print.txt
+ echo 'EMC terminated with an error.  You can find more information in the log:
    /home/stonok2/emc_debug.txt
and
    /home/stonok2/emc_print.txt
as well as in the output of the shell command '\''dmesg'\'' and in the terminal'
EMC terminated with an error.  You can find more information in the log:
    /home/stonok2/emc_debug.txt
and
    /home/stonok2/emc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
+ rm -f /dev/fd/2 /tmp/emc.print.WUZjj9
+ exit 255
stonok2@stonok2:~$ emc -d
Debug mode on
+ getopts dvlhk opt
+ shift 1
+ case "2.6.32-122-rtai" in
++ uname -r
+ '[' 2.6.32-122-rtai '!=' 2.6.32-122-rtai ']'
+ tty -s
+ trap ErrorCheck EXIT
+ '[' '!' -z '' ']'
+ EXTRA_ARGS=
+ RUN_IN_PLACE=no
+ echo RUN_IN_PLACE=no
+ EMC2VERSION=2.4.3
+ export EMC2VERSION
+ INIVAR=inivar
+ HALCMD='halcmd '
+ PICKCONFIG='/usr/bin/wish8.5 /usr/share/emc/tcl/bin/pickconfig.tcl'
+ EMC2_EMCSH=/usr/bin/wish8.5
+ echo EMC2_DIR=
+ echo EMC2_BIN_DIR=/usr/bin
+ echo EMC2_TCL_DIR=/usr/share/emc/tcl
+ echo EMC2_SCRIPT_DIR=
+ echo EMC2_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
+ echo EMC2_CONFIG_DIR=
+ echo EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
+ echo INIVAR=inivar
+ echo HALCMD=halcmd
+ echo EMC2_EMCSH=/usr/bin/wish8.5
+ export EMC2_TCL_DIR
+ export EMC2_EMCSH
+ export EMC2_HELP_DIR
+ export EMC2_LANG_DIR
+ export REALTIME
+ export HALCMD
+ echo 'EMC2 - 2.4.3'
EMC2 - 2.4.3
+ '[' '!' -z '' ']'
+ '[' '!' -n '' ']'
++ /usr/bin/wish8.5 /usr/share/emc/tcl/bin/pickconfig.tcl
+ INIFILE=/home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ '[' '!' -n /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini ']'
+ INI_NAME=Plasma_xyz.ini
+ INI_DIR=/home/stonok2/emc2/configs/Plasma_xyz
+ echo 'Machine configuration directory is '\''/home/stonok2/emc2/configs/Plasma_xyz'\'''
Machine configuration directory is '/home/stonok2/emc2/configs/Plasma_xyz'
+ echo 'Machine configuration file is '\''Plasma_xyz.ini'\'''
Machine configuration file is 'Plasma_xyz.ini'
+ '[' '!' -f /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini ']'
+ echo INIFILE=/home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ retval=
+ GetFromIni PARAMETER_FILE RS274NGC
+ name=PARAMETER_FILE
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var PARAMETER_FILE -sec RS274NGC
+ retval=emc.var
+ '[' '!' -n PARAMETER_FILE ']'
+ echo PARAMETER_FILE=emc.var
+ RS274NGC_PARAMFILE=emc.var
+ GetFromIni EMCMOT EMCMOT
+ name=EMCMOT
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var EMCMOT -sec EMCMOT
+ retval=motmod
+ '[' '!' -n EMCMOT ']'
+ echo EMCMOT=motmod
+ EMCMOT=motmod.ko
+ GetFromIni EMCIO EMCIO
+ name=EMCIO
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var EMCIO -sec EMCIO
+ retval=io
+ '[' '!' -n EMCIO ']'
+ echo EMCIO=io
+ EMCIO=io
+ GetFromIni TASK TASK
+ name=TASK
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var TASK -sec TASK
+ retval=milltask
+ '[' '!' -n TASK ']'
+ echo TASK=milltask
+ EMCTASK=milltask
+ EMCSERVER=emcsvr
+ GetFromIniQuiet HALUI HAL
+ name=HALUI
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var HALUI -sec HAL
+ retval=halui
+ '[' '!' -n HALUI ']'
+ echo HALUI=halui
+ HALUI=halui
+ GetFromIni DISPLAY DISPLAY
+ name=DISPLAY
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var DISPLAY -sec DISPLAY
+ retval=axis
+ '[' '!' -n DISPLAY ']'
+ echo DISPLAY=axis
++ set -- axis
++ echo axis
+ EMCDISPLAY=axis
++ set -- axis
++ shift
++ echo
+ EMCDISPLAYARGS=
+ GetFromIniQuiet NML_FILE EMC
+ name=NML_FILE
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var NML_FILE -sec EMC
+ retval=
+ '[' '!' -n NML_FILE ']'
+ echo NML_FILE=
+ NMLFILE=
+ '[' -z '' ']'
+ NMLFILE=/usr/share/emc/emc.nml
+ export NMLFILE
+ KILL_TASK=
+ KILL_TIMEOUT=20
+ LOCKFILE=/tmp/emc.lock
+ '[' -f /tmp/emc.lock ']'
+ echo Starting EMC2...
Starting EMC2...
+ trap 'Cleanup ; exit 0' SIGINT SIGTERM
+ cd /home/stonok2/emc2/configs/Plasma_xyz
+ touch /tmp/emc.lock
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var INTRO_GRAPHIC -sec DISPLAY
+ img=emc2.gif
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var INTRO_TIME -sec DISPLAY
+ imgtime=5
+ '[' 5 = '' ']'
+ '[' emc2.gif '!=' '' ']'
+ '[' -e emc2.gif ']'
+ '[' -e /home/stonok2/emc2/configs/Plasma_xyz/emc2.gif ']'
+ '[' -e /usr/share/emc/emc2.gif ']'
+ img=/usr/share/emc/emc2.gif
+ '[' /usr/share/emc/emc2.gif '!=' '' ']'
+ '[' -x /usr/share/emc/tcl/bin/popimage ']'
+ echo 'Starting EMC2 server program: emcsvr'
+ program_available emcsvr
+ type -path emcsvr
+ export INI_FILE_NAME=/home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ INI_FILE_NAME=/home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ sleep 1
+ emcsvr -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ /usr/share/emc/tcl/bin/popimage /usr/share/emc/emc2.gif 5
+ echo 'Loading Real Time OS, RTAPI, and HAL_LIB modules'
+ /etc/init.d/realtime start
+ export HAL_RTMOD_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
+ HAL_RTMOD_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
+ echo 'Starting EMC2 IO program: io'
+ program_available io
+ type -path io
+ halcmd loadusr -Wn iocontrol io -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ '[' -n halui ']'
+ echo 'Starting HAL User Interface program: halui'
+ program_available halui
+ type -path halui
+ halcmd loadusr -Wn halui halui -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini
+ NUM=1
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var HALFILE -sec HAL -num 1
+ CFGFILE=Plasma_xyz.hal
+ '[' -n Plasma_xyz.hal ']'
+ case $CFGFILE in
+ halcmd -i /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -f Plasma_xyz.hal
Plasma_xyz.hal:4: Unknown command '﻿loadrt'
+ '[' '' = '' ']'
+ Cleanup
+ echo 'Shutting down and cleaning up EMC2...'
Shutting down and cleaning up EMC2...
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x xemc
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x yemc
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x emcpanel
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x keystick
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x iosh
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x emcsh
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x emcrsh
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x emctop
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x mdi
+ for KILL_TASK in xemc yemc emcpanel keystick iosh emcsh emcrsh emctop mdi debuglevel
+ /bin/pidof -x debuglevel
+ program_available axis-remote
+ type -path axis-remote
+ '[' '!' -z :0.0 ']'
+ axis-remote --ping
+ '[' '' = other ']'
++ inivar -ini /home/stonok2/emc2/configs/Plasma_xyz/Plasma_xyz.ini -var SHUTDOWN -sec HAL
+ SHUTDOWN=
+ '[' -n '' ']'
+ for KILL_TASK in emcsvr milltask
+ /bin/pidof -x emcsvr
2409
+ KillTaskWithTimeout
+ '[' '!' -n '' ']'
++ /bin/pidof -x emcsvr
+ KILL_PIDS=2409
+ '[' '!' -n 2409 ']'
+ for KILL_PID in '$KILL_PIDS'
+ echo 'Killing task emcsvr, PID=2409'
+ /bin/kill 2409
+ WAIT=20
+ '[' 20 -gt 1 ']'
+ /bin/ps 2409
  PID TTY      STAT   TIME COMMAND
+ WAIT=0
+ '[' 0 -gt 1 ']'
+ '[' 0 -gt 0 ']'
+ '[' 0 -gt 0 ']'
+ KILL_PIDS=
+ KILL_TASK=
+ for KILL_TASK in emcsvr milltask
+ /bin/pidof -x milltask
+ echo 'Stopping realtime threads'
Stopping realtime threads
+ halcmd stop
+ echo 'Unloading hal components'
Unloading hal components
+ halcmd unload all
++ seq 10
+ for i in '`seq 10`'
++ wc -w
++ halcmd list comp
+ '[' 1 = 1 ']'
+ break
+ echo 'Removing HAL_LIB, RTAPI, and Real Time OS modules'
+ /etc/init.d/realtime stop
+ echo 'Removing NML shared memory segments'
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1001
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1002
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1003
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1004
+ read b x t x x x x x x m x
+ case $b$t in
+ ipcrm -M 1005
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ case $b$t in
+ read b x t x x x x x x m x
+ '[' -f /tmp/emc.lock ']'
+ rm /tmp/emc.lock
+ echo 'Cleanup done'
Cleanup done
+ exit -1
+ ErrorCheck
+ result=255
+ '[' '!' -z :0.0 ']'
+ /usr/bin/wish8.5
+ echo 'catch {send -async popimage destroy .}; destroy .'
+ '[' 255 -ne 0 ']'
+ tty -s
+ '[' -f /dev/fd/2 ']'
+ echo '(debug information was sent to stderr)'
+ '[' -f /tmp/emc.print.e1zQlz ']'
+ cp /tmp/emc.print.e1zQlz /home/stonok2/emc_print.txt
+ echo 'EMC terminated with an error.  You can find more information in the log:
    /home/stonok2/emc_debug.txt
and
    /home/stonok2/emc_print.txt
as well as in the output of the shell command '\''dmesg'\'' and in the terminal'
EMC terminated with an error.  You can find more information in the log:
    /home/stonok2/emc_debug.txt
and
    /home/stonok2/emc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
+ rm -f /dev/fd/2 /tmp/emc.print.e1zQlz
+ exit 255
stonok2@stonok2:~$ 
